<template>
    <div class="load-box">
        <div class="loader">
            <span></span>
            <span></span>
            <span></span>
        </div>
    </div>
</template>

<script>
</script>

<style scoped lang="scss">
.load-box {
  width: 100%;
  height: calc(100vh - 2rem);
  display: flex;
  justify-content: center;
  align-items: center;

  .loader {
    position: relative;
    width: 3rem;
    height: 3rem;

    span {
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      box-shadow: 0 0 0.1rem 0.05rem var(--box-shadow-c);

      &:nth-child(1) {
        background: var(--main-2-ha3);
        backdrop-filter: blur(0.2rem);
        z-index: 2;
      }

      &:nth-child(2) {
        background: var(--red-color);
        z-index: 2;
        animation: move 4s ease-in-out infinite;
      }

      &:nth-child(3) {
        background: var(--green-color);
        z-index: 2;
        border-radius: 0;
        animation: move 4s ease-in-out infinite;
      }
    }
  }
}

@keyframes move {
  0% {
    transform: translate(-3rem, 1rem) scale(0.4) rotate(0deg);
    z-index: 1;
  }
  50% {
    transform: translate(3rem, -1rem) scale(0.4) rotate(180deg);
    z-index: 1;
  }
  50.00001% {
    transform: translate(3rem, -1rem) scale(0.4) rotate(180deg);
    z-index: 3;
  }
  100% {
    transform: translate(-3rem, 1rem) scale(0.4) rotate(360deg);
    z-index: 1;
  }
}
</style>